﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp9
{
    class Student
    {


        private int age;

        public int Age
        {
            get { return this.age; }
            set
            {
                this.age = value;
                if (Age == 150 || Age < 0)
                {
                    age = 10;
                }
            }
        }

        public Student(int Age)
        {
            this.age = Age;
            Console.WriteLine(age);
            Console.WriteLine("我是无参");
        }


        public void Say() {
            Console.WriteLine(this.age);
        }
    }
}
